#begin {
    position: relative;
    display: flex;
    width: 100vh;
    height: 100vh;
}

.register_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.register_box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background-color: #fff;
    color: #222;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid #6f67a4;
    font-size: 20px;
    font-weight: 500;
    opacity: 1;
}

.register_box_fixed {
    position: fixed;
    top: 20px;
    left: 20px;
    transform: none;
    background: #fff;
    color: #222;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 2px solid #6f67a4;
    font-size: 18px;
    font-weight: 500;
    opacity: 1;
    min-width: 120px;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 2000;
    max-width: 70vw;
    flex-wrap: nowrap;
}

.user_timer_container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 60vw;
}

.user_id {
    color: #6f67a4;
    font-weight: bold;
    font-size: 18px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    padding: 2px 8px;
    display: inline-block;
}
.user_id:hover {
    background: #f0f0ff;
    border-radius: 16px;
}

.register_box_fixed input[type="text"] {
    width: 120px;
    min-width: 80px;
    max-width: 180px;
    margin: 0 0 0 0;
    flex-shrink: 1;
}

.timer {
    position: static;
    background-color: transparent;
    color: rgb(111, 103, 164);
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 500;
    font-family: monospace;
    display: inline-flex;
    align-items: center;
    border: 2px solid rgb(179, 179, 179);
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 40px;
    box-sizing: border-box;
    width: 100px;
    justify-content: center;
    z-index: 2000;
    flex-shrink: 0;
}

.register {
    color: #fff;
    background: #6f67a4;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
}

.register_box input {
    color: #222;
    background: #f5f5fa;
    border: 1.5px solid #6f67a4;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 16px;
    margin-top: 10px;
}

.warning {
    color: #ff6b6b;
    font-size: 14px;
    margin: 10px 0 0 0;
    font-weight: normal;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

.start {
    font-size: 200px !important;
    color: rgb(255, 255, 255);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.start_text {
    position: relative;
    display: flex;
    position: fixed;
    top: 77%;
    left: 50%;
    transform: translate(-50%, -77%);
}

.start_text h1 {
    font-size: 80px;
    margin-left: 10px;
    margin-right: 10px;
    color: rgb(0, 186, 186);
    cursor: default;
}

.bounce-now {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }

    100% {
        transform: translateY(0);
    }
}

.music {
    font-size: 80px !important;
    color: rgb(255, 255, 255);
    position: fixed;
    top: 5%;
    left: 92%;
    transform: translate(-92%, -5%);
    cursor: pointer;
    animation: spin 4s linear infinite;
    animation-play-state: paused;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.game_board {
    display: grid;
    grid-template-columns: repeat(5, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.right {
    /* border: 5px solid rgba(203, 156, 215,0.5); */
    /* border-radius: 15px; */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win_popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win_popup_content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 40px 60px;
    text-align: center;
    color: #6f67a4;
    font-size: 22px;
    font-weight: bold;
    min-width: 320px;
}

.win_popup_content h2 {
    font-size: 32px;
    margin-bottom: 18px;
    color: #4caf50;
}

.win_popup_content p {
    font-size: 20px;
    margin-bottom: 24px;
    color: #222;
}

.close_win_popup {
    background: #6f67a4;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.close_win_popup:hover {
    background: #4caf50;
}

.restart_btn {
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f0ff 100%);
    border: none;
    outline: none;
    margin-left: 0;
    padding: 4px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(111,103,164,0.10);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    flex-shrink: 0;
}
.restart_btn:hover {
    background: linear-gradient(135deg, #d1e7dd 0%, #e0e7ff 100%);
    box-shadow: 0 4px 16px rgba(76,175,80,0.18);
    transform: scale(1.08) rotate(-8deg);
}
.restart_icon {
    display: block;
    width: 28px;
    height: 28px;
    transition: transform 0.2s, stroke 0.2s;
}
.restart_btn:hover .restart_icon {
    transform: rotate(-90deg) scale(1.12);
}

.guide_popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guide_popup_content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 40px 60px;
    text-align: left;
    color: #6f67a4;
    font-size: 20px;
    font-weight: bold;
    min-width: 340px;
    max-width: 90vw;
}
.guide_popup_content h2 {
    font-size: 28px;
    margin-bottom: 18px;
    color: #4caf50;
    text-align: center;
}
.guide_popup_content ul {
    margin: 0 0 24px 0;
    padding-left: 22px;
    color: #333;
    font-size: 17px;
    font-weight: normal;
}
.guide_popup_content li {
    margin-bottom: 8px;
    line-height: 1.7;
}
.guide_start_btn {
    background: linear-gradient(135deg, #6f67a4 0%, #a3a1e4 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 36px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(111,103,164,0.10);
    display: block;
    margin: 0 auto;
}
.guide_start_btn:hover {
    background: linear-gradient(135deg, #4caf50 0%, #6f67a4 100%);
    box-shadow: 0 4px 16px rgba(76,175,80,0.18);
}

.rank_btn {
    background: none;
    border: none;
    outline: none;
    margin-right: 10px;
    padding: 2px 2px 2px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: background 0.2s;
    position: relative;
    flex-shrink: 0;
}
.rank_btn:hover {
    background: #fffbe7;
}
.rank_icon {
    display: block;
    width: 28px;
    height: 28px;
    transition: transform 0.2s, stroke 0.2s;
}
.rank_btn:hover .rank_icon {
    transform: scale(1.12) rotate(-10deg);
    filter: drop-shadow(0 0 6px #ffe082);
}

.rank_popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rank_popup_content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 40px 30px;
    text-align: center;
    color: #6f67a4;
    font-size: 20px;
    font-weight: bold;
    min-width: 320px;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
}
.rank_popup_content h2 {
    font-size: 28px;
    margin-bottom: 18px;
    color: #f7b731;
    text-align: center;
}
.rank_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 18px;
    background: #fffbe7;
    border-radius: 10px;
    overflow: hidden;
    min-width: 300px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    table-layout: fixed;
}
.rank_table th, .rank_table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ffe082;
    word-break: break-all;
    text-align: center;
}
.rank_name_cell {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.rank_table th {
    background: #ffe082;
    color: #6f67a4;
    font-weight: bold;
}
.rank_table tr:last-child td {
    border-bottom: none;
}
.rank_close_btn {
    background: linear-gradient(135deg, #f7b731 0%, #ffe082 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(247,183,49,0.10);
    display: block;
    margin: 0 auto;
}
.rank_close_btn:hover {
    background: linear-gradient(135deg, #ffe082 0%, #f7b731 100%);
    box-shadow: 0 4px 16px rgba(247,183,49,0.18);
}

